<?php
/***************************************************************************
 * @Description: rich-text Field 富文本字段
 * 
 * @FileName:         RtField.php
 * @Author :          liyong5@staff.sina.com.cn
 * @CreatedTime:      2018年08月13日 星期一 12时31分26秒
 ************************************************************************/
namespace app\modules\core\models;

use Yii;
use app\modules\core\models\Field;
use app\modules\core\interfaces\FieldInterface;

class RtField extends Model implements FieldInterface
{
    public $id = 'content';

    public $name = '内容';

    public $view = 'view';

    public function install($params) {
        $field = [
            'id'            => $this->id,
            'type'          => '',
            'name'          => $this->name,
            'classNs'       => RtField::className();
            'desc'          => '富文本编辑器',
            'view'          => 'view',
            'source'        => '',
            'sourceType'    => Field::DATA_STYPE_AUTO,
            'validates'     => [],
        ];
    }

    public function uninstall() {
    }

    public function isGroup() {
        return false;
    }
    
    public function genValidate() {
        return [
        ];
    }

    public function validate() {
    }

    public function view() {
    }
}
